package com.jiazhong.example.project.shoppingcart.mapper;

import com.jiazhong.example.project.shoppingcart.bean.Books;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface BooksMapper {

    @Select("select b.*,number as 'stockNumber' from books b left join stock s on b.id=s.book_id where state=1")
    List<Books> findAll();
}
